package com.misty.blog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.misty.common.bean.Result;
import com.misty.dao.domain.Tag;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author cthulhu
 * @since 2022-11-21
 */
public interface TagService extends IService<Tag> {

    Result<List<String>> selectTagNameByBlog(Integer blogId);

    Result<List<String>> selectTagNameByUser(Integer userId);

    Result<List<String>> getAllTag();

    @Transactional(transactionManager = "mistyTransactionManager")
    Result<?> addAllTag(List<String> tagList, Integer blogId);

    @Transactional(transactionManager = "mistyTransactionManager")
    Result<?> removeAllTag(List<String> tagList, Integer blogId);
}
